import React, { Component } from 'react'
import '../css/addtab.scss'
export default class Addtab extends Component {
  constructor(props) {
    super(props)
  }

  close = () => {
    this.props.Close(false)
  }
  onok = () => {
    console.log(12312, false);
    this.props.OnOk(false)

  }
  render() {
    return (
      <div>
        {
          (this.props.isShow &&
            <div className='Addtab'>
              <div className='model' style= {{ height:this.props.height}}>

                <header>
                  <h2>{this.props.title}<button onClick={this.close}>×</button></h2>
                </header>




                {
                  this.props.children //接收传递过来的子标签
                }
                <footer>
                  <button onClick={this.onok} >确认</button>
                </footer>
              </div>
            </div> 
          )
        }
      </div>


    )
  }
}
